''''''

# Standard
import logging
# Related
# Local
import moopy.al.command.scene


logger = logging.getLogger('moopy')

class Scene(object):
    '''A representation of an existing modo scene.
    '''

    def __init__(self, index, *args, **kwargs):
        '''
        '''
        super(Scene, self).__init__(*args, **kwargs)
        
        self.index = index
    
    def __repr__(self):
        '''
        '''
        return "<class 'moopy.scene.Scene', index:%d, name:%s>" % (
            self.index, self.name)

    def __str__(self):
        '''
        '''
        return 'Scene, Name %s' % (self.name)
    
    def __eq__(self, other):
        ''''''
        raise NotImplementedError()
    
    def __ne__(self, other):
        ''''''
        raise NotImplementedError()
    
    def _get_changed(self):
        ''''''
        raise NotImplementedError()
    
    changed = property(
        _get_changed,
        doc='''
        '''
    )
    
    def _get_file_path(self):
        ''''''
        raise NotImplementedError()
    
    file_path = property(
        _get_file_path,
        doc='''
        '''
    )
    
    def _get_format(self):
        ''''''
        raise NotImplementedError()
    
    format = property(
        _get_format,
        doc='''
        '''
    )
    
    def _get_name(self):
        ''''''
        return moopy.al.query.scene.get_scene_name(self.index)
    
    name = property(
        _get_name,
        doc='''The name of the scene. Note that this is just shorthand for
        the file name.
        '''
    )
    
    @classmethod
    def current(cls):
        '''Get the current scene.'''
        scene_index = moopy.al.query.scene.get_current_scene_index()
        
        scene = cls(scene_index)
    
    @classmethod
    def load(cls, file_path):
        '''Load a scene file a file, and return the object.'''
        raise NotImplementedError()
    
    @classmethod
    def new(cls, preserve_current_scene=False):
        ''''''
        scene_index = moopy.al.command.scene.create_new_scene(
            preserve_current_scene=preserve_current_scene)
        
        scene = cls(scene_index)
        
        return scene
    
    def save(self, file_path=None):
        ''''''
        raise NotImplementedError()
